package demo1;

import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Spider-Man
 * Date: 2024-03-25
 * Time: 15:24
 */
 
public class Main1 {
    public static void main(String[] args) {
        SeqList seqList = new SeqList();
        seqList.display();
        seqList.add(1);
        seqList.add(2);
        seqList.add(3);
        seqList.add(4);
        seqList.add(5);
        seqList.add(6);
        seqList.display();
        //捕获异常
        try {
            seqList.get(100);
        } catch (PosOutBoundsException e) {
            e.printStackTrace();
            System.out.println();
        }
    }
    public static void main1(String[] args) {
        List<Integer> stack = new Stack<>();//栈
        List<Integer> arraylist = new ArrayList<>();//顺序表
        List<Integer> linkedlist = new LinkedList<>();
    }
}
